package com.yuw.control;

import com.yuw.bean.UserInfoBean;
import com.yuw.modal.UserModel;
import com.yuw.utils.MyUtils;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import java.io.IOException;

@WebServlet(name = "ModifyJumpServlet", value = "/modifyJump")
public class ModifyJumpServlet extends HttpServlet {
    @Override
    protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        // 获取需要修改数据记录的id值
        String strID = request.getParameter("id");
        // 根据id查询该条数据局记录
        UserInfoBean userInfoBean = MyUtils.getNewInstance(UserModel.class).queryUserInfoById(strID);
        // 缓存数据
        request.getSession().setAttribute("userInfoBean", userInfoBean);
        // 跳转到修改页面
        request.getRequestDispatcher("WEB-INF/viewpages/userInfoB/UserInfoModify.jsp").forward(request, response);
    }


}
